﻿using System;
using UniRx;
using UniRx.Triggers;
using UnityEngine;
using UnityEngine.UI;

namespace Studio
{
	// Token: 0x02000550 RID: 1360
	public class UI_ColorMenu : UI_ColorPicker
	{
		// Token: 0x060022B6 RID: 8886 RVA: 0x000D10A0 File Offset: 0x000CF2A0
		public void InitColorMenu()
		{
			base.Init();
		}

		// Token: 0x060022B7 RID: 8887 RVA: 0x000D10A8 File Offset: 0x000CF2A8
		private void Start()
		{
			this.UpdateAsObservable().Subscribe(delegate(Unit _)
			{
				float a = 0f;
				float num = 0f;
				foreach (RectTransform rectTransform in this.sizeHeight)
				{
					if (!(null == rectTransform))
					{
						num += rectTransform.sizeDelta.y;
					}
				}
				float y = Mathf.Lerp(a, num, this.rateHeight);
				Vector2 sizeDelta = new Vector2(this.rtfColorControlPanel.sizeDelta.x, y);
				this.rtfColorControlPanel.sizeDelta = sizeDelta;
				if (this.infoPicker && this.infoPicker.isOn && this.rtfPickerPos)
				{
					base.OnChangePickerRectValue();
				}
			});
		}

		// Token: 0x060022B8 RID: 8888 RVA: 0x000D10C4 File Offset: 0x000CF2C4
		public void HideColorMenu(bool hide)
		{
			base.gameObject.SetActive(!hide);
		}

		// Token: 0x060022B9 RID: 8889 RVA: 0x000D10D8 File Offset: 0x000CF2D8
		public void ChangeWindowTitle(string name)
		{
			if (this.winTitle)
			{
				this.winTitle.text = name;
			}
		}

		// Token: 0x040023D4 RID: 9172
		public float rateHeight = 1f;

		// Token: 0x040023D5 RID: 9173
		public RectTransform[] sizeHeight;

		// Token: 0x040023D6 RID: 9174
		public Text winTitle;

		// Token: 0x040023D7 RID: 9175
		public RectTransform rtfColorControlPanel;
	}
}
